﻿using System.IO;
using RayDen.Library.Core;
using RayDen.Library.Data.Imaging;

namespace RayDen.Library.Data
{
    public class EnvironmentSamplerBase
    {
        protected  static RgbSpectrumTexture LoadTexture(string fileName)
        {
            return Path.GetFileName(fileName).NameContains("hdr", "exr")
                       ? ImageFactory.FreeImageLoadExrBitmap(fileName)
                       : ImageFactory.FreeImageLoadBitmap(fileName);
        }
    }
}